package hash;

import java.util.HashMap;

public class hashInHashMap {
	static int hash(int h) {  
		h ^= (h >>> 20) ^ (h >>> 12);  
		return h ^ (h >>> 7) ^ (h >>> 4);  
	}  


	public static void main(String[] args) {
		/*
		String s1 = "aaaa";
		int h = 0;
		System.out.println(h=s1.hashCode());
		System.out.println(hash(h));


		HashMap<String,String> hm = new HashMap<String,String>();
		String s3 = new String("123");
		System.out.println("------");
		System.out.println(s3.hashCode());
		System.out.println(hash(s3.hashCode()));
		
		System.out.println(hash(s3.hashCode()) & 15);
		
		System.out.println("i9".hashCode());
		System.out.println(hash("i9".hashCode()));
		System.out.println(hash("i9".hashCode()) & 15);
		System.out.println("------");
		
		hm.put(s3, s3);
		hm.put("i9", "i9");
		System.out.println("Aa".hashCode());
		System.out.println("BB".hashCode());
		
		char[] char_arr= "BB".toCharArray();
		int i1=char_arr[0];
		int i2=char_arr[1];
		System.out.println(i1 + "  " + i2);
		System.out.println(i1 * 31 + i2);
		//	hm.put(s1, value);
		*/
		int i = 1;
		int b = (i << 26) - 1;
		String str = Integer.toBinaryString(b);
		System.out.println(str);
		System.out.println(b);
	}

}
